﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace System.Drawing.Drawing2D {
	internal static class Rectangle_expand {
		public static Rectangle CreateRectangle(Point a, Point b) {
			Rectangle rev = new Rectangle();
			if(a.X <= b.X) {
				rev.X = a.X;
				rev.Width = b.X - a.X;
			} else {
				rev.X = b.X;
				rev.Width = a.X - b.X;
			}
			if (a.Y<= b.Y) {
				rev.Y = a.Y;
				rev.Height = b.Y - a.Y;
			} else {
				rev.Y = b.Y;
				rev.Height = a.Y - b.Y;
			}
			return rev;
		}
	}
}
